﻿<!DOCTYPE html>
<!--特种作业安全教育记录表-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <link href="../static/js/vue-treeselect/vue-treeselect.css" rel="stylesheet" />
    <script src="../static/js/vue-treeselect/vue-treeselect.js"></script>
    <style>
        .vue-treeselect__control {
            height: 100%;
            border: none;
            background: none;
        }

        .vue-treeselect__placeholder {
            top: -3px;
        }

        .vue-treeselect__single-value {
            top: -3px;
        }

        .el-col ,td{
            padding: 10px;
            font-size: 14px;
        }
        .el-form-item {
            margin-bottom: 0px !important;
        }

        .el-input-group__prepend{
            color: #000;
            font-size: 14px;
        }

        .el-input__inner{
            color: #606266!important
        }

        .el-input-group__prepend {
            padding-left: 0
        }

        .el-input-group__prepend,
        .el-input__inner,
        .el-form-item__label {
            color: #000;
            font-size: 14px;
        }

        .el-form-item__label{
            padding-left: 0!important;
        }

        .el-input-group__prepend {
            padding-left: 0
        }
    </style>
</head>
<body>
    <div id="app" v-cloak class="popupW150">
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">特种作业安全教育记录表</label>
        </div>
        <div style="width:100%;text-align:right ">
            <label>  {{SpecialOperationSafetyEducation.RecordNumber+mark.m}} {{Form.RecordNumber}}</label>
        </div>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%" class="safeCard">
            <!--<el-row type="flex" justify="end">
        <el-col span="23">
            {{SpecialOperationSafetyEducation.RecordNumber+mark.m}} {{Form.RecordNumber}}
        </el-col>
    </el-row>-->

            <table style="border:1px  solid;  width:100%; border-bottom:0px solid" cellpadding="0" cellspacing="0">
                <tr style="border:1px  solid;">
                    <td width="50%" style="border-bottom:1px solid;padding-left:10px">
                        <el-form-item :label="SpecialOperationSafetyEducation.EducationStartTime+mark.m" class="inputTextarea">
                            <el-date-picker v-model="Form.EducationStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                                            placeholder="选择时间">
                            </el-date-picker>
                        </el-form-item>
                    </td>
                    <td width="50%" style="border-bottom:1px solid;padding-left:10px">
                        <el-form-item :label="SpecialOperationSafetyEducation.EducationEndTime+mark.m" class="inputTextarea">
                            <el-date-picker v-model="Form.EducationEndTime" type="datetime" placeholder="选择时间" value-format="yyyy-MM-dd HH:mm:ss">
                            </el-date-picker>
                        </el-form-item>
                        </td>
                </tr>
            </table>

                <table style="border:1px  solid;  width:100%; border-bottom:0px solid;border-top:0px solid" cellpadding="0" cellspacing="0">
                    <!--作业区域 属地单位  受限空间内原危险介质名称-->
                 
                    <thead>
                        <tr style="border:1px  solid;">
                            <td width="20%" style="border-bottom:1px solid ; text-align:center;border-right:1px solid ">
                                {{JobLicenseManagement.SerialNumber}}
                            </td>
                            <td width="80%" style="border-bottom:1px solid ; text-align:center">
                                {{SpecialOperationSafetyEducation.MainContentSafetyEducation}}
                            </td>
                        </tr>
                    </thead>
                    <tbody v-for="todo in Form.MainContentSafetyEducation">
                        <tr>
                            <td width="20%" style="border-bottom:1px solid ;border-right:1px solid; text-align:center ">
                                {{todo.id}}
                            </td>
                            <td width="80%" style="border-bottom:1px solid ">
                                {{todo.SafetyMeasures}}
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table style="border:1px  solid;  width:100%; border-top:0px solid" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="40%" style="border-bottom:1px solid">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">

                                        <template slot="prepend">
                                            {{SpecialOperationSafetyEducation.Educator+mark.m}}
                                        </template>
                                        <treeselect v-model="Form.Educator"
                                                    :options="PersonInCharge"
                                                    :flat="true"
                                                    :show-count="true"
                                                    :disable-branch-nodes="true"
                                                    slot="suffix"
                                                    style="line-height: 28px;width:70%;float: right;"
                                                    placeholder="请选择" />
                                    </el-input>
                                </el-form-item>
                            </div>
                        </td>
                        <td width="60%" style="border-bottom:1px solid"></td>
                    </tr>
                    <tr>
                        <td width="40%">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">

                                        <template slot="prepend">
                                            {{SpecialOperationSafetyEducation.EducatedPerson+mark.m}}
                                        </template>
                                        <treeselect v-model="Form.EducatedPerson"
                                                    :options="PersonInCharge"
                                                    :flat="true"
                                                    :show-count="true"
                                                    :disable-branch-nodes="true"
                                                    slot="suffix"
                                                    style="line-height: 28px;width:70%;float: right;"
                                                    placeholder="请选择" />
                                    </el-input>
                                </el-form-item>
                            </div>
                        </td>
                        <td width="60%"></td>
                    </tr>

                </table>


                <el-row>
                    <el-form-item style="text-align:center; padding-top:5px">
                        <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                        <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    </el-form-item>
                </el-row>
        </el-form>
        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        Vue.component('treeselect', VueTreeselect.Treeselect)
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                Form: {
                    id: guidEmpty,
                    EducationTime: "",
                    EducationStartTime: '',
                    EducationEndTime:'',
                    RecordNumber: "",
                    Educator: null,
                    EducatedPerson: null,
                    MainContentSafetyEducation: [],
                    SignatureStatus: "",
                    EducatorDept: "",
                    EducatedPersonDept: '',
                },
                Confirmor: [],
                DeptList: [],
                ListItem: ListItem,
                mydata: PersonInChargeTree,
                PersonInCharge: [],
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleChange: function (value) {
                    console.log(value);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    getDataAdd(this, '/api/SpecialOperationSafetyEducation/get?id=' + this.id);
                },

                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    console.log(mythis)
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/SpecialOperationSafetyEducation/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
            },
            mounted: function () {
                this.PersonInCharge = fn(this.mydata, "0");
                var list = getDicDataArray(['09', '08']);
                this.DeptList = getDicDatafromArray("08", list);//
                this.Confirmor = getDicDatafromArray("09", list);//
                this.id = getUrlParam("id");
                this.getData();
                //this.BasedDatabaseManagementRequirements = this.Form.BasedDatabaseManagementRequirements;
            }
        });
    </script>
</body>
</html>